package com.sh.data.engine.application.model.request.management;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import lombok.Data;

import java.util.List;

/**
 * @author: mengzheng.mhc
 * @date: 2024/12/10 14:42
 */
@Data
@Schema
public class ProjectRoleUpdateRequest {

    @Schema(description = "角色ID", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotBlank(message = "角色ID不能为空")
    private Long id;

    @Schema(description = "角色名称", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    @NotBlank(message = "角色名称不能为空")
    private String name;

    @Schema(description = "角色描述", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    private String desc;

    @Schema(description = "菜单权限", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    private List<MenuEntry> menus;

    @Data
    public static class MenuEntry {
        /**
         * 菜单id
         */
        private Long menuId;

        /**
         * 读写权限 0读 1读写
         */
        private Integer readWriteStatus;
    }
}
